/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.menosehmais.framework.persistence;

import java.util.List;
import java.util.Map;

/**
 *
 * @author Rafael Quintino Gomes Rosa
 */
public interface DataAccessObject< DO extends DomainObject > {
	public List<DO> selectAll();
        public List<DO> selectAll(int first, int max);
	public DO selectById(String id);
        public List<DO> findByStringFields(Map<String, String> fieldsAndLikesMap, boolean ignoreCase, int first, int max);
        public List<DO> findByStringField(String field, String likes, boolean ignoreCase, int first, int max);
        public List<String> selectStringListByFieldLikeString(String field, String likes, boolean ignoreCase, int first, int max);
        public List<DO> selectUsingFilter(DO filter);
	public List<DO> selectUsingFilter(DO filter, String ... excludeProperties);
	public DO update(DO object);
	public void updateUsingFilter(DO filter, DO object);
	public void deleteById(String id);
	public void delete(DO object);
	public void deleteUsingFilter(DO filter);
	public DO insert(DO object);
	public Long count();
}